1. The Field of the Invention
The present invention relates to electronic communications. Specifically, the present invention relates to a system and method for converting a file system path into a uniform resource locator (URL).
2. The Prior State of the Art
The Internet is a world-wide network of computer systems and networks which allows a computer user to obtain a wide variety of information on demand. Specifically, to obtain desired information, a computer user first employs Internet browser software to select a uniform resource locator (URL) that identifies a potential source of the desired information. A URL is an address used to identify a resource on the Internet.
An example of a URL is as follows:
xe2x80x9chttp://www.domain.com:123/subdirectory/sub/filexe2x80x9d
The xe2x80x9chttp://xe2x80x9d portion of the URL is called a xe2x80x9cprotocol prefixxe2x80x9d because it designates the protocol used in communicating the request to the server system, and in communicating back the appropriate response. The protocol prefix xe2x80x9chttp://xe2x80x9d is common as it indicates a widely used Internet protocol called HyperText Transport Protocol (HTTP). Other protocol prefixes might include xe2x80x9cftp://xe2x80x9d (File Transfer Protocol), xe2x80x9chttps://xe2x80x9d (HyperText Transport Protocol Secure) and so forth.
The xe2x80x9cwww.domain.comxe2x80x9d portion of the URL is called a xe2x80x9cdomain name.xe2x80x9d The domain name is a unique Internet alphanumeric address that identifies the virtual location of Internet resources related to a particular organization. For example, URLs containing the domain name xe2x80x9cwww.companyXYZ.comxe2x80x9d might include resources related to a company fictionally named Company XYZ.
The domain name is a xe2x80x9cvirtualxe2x80x9d location because the domain name does not necessarily correspond to any physical location. Indeed, resources that are within a common domain name may be physically stored in different memory devices, or even in entirely different servers. However, the location of the domain name is xe2x80x9cvirtualxe2x80x9d in that the location of all the resources appears from the end-user""s viewpoint to be in a common location. The servers on the Internet resolve the details of the actual physical location of the resource and make it appear to the user as though all of the resources are neatly organized under the domain name.
The xe2x80x9c:123xe2x80x9d portion of the URL is called the xe2x80x9cport number.xe2x80x9d Typically, the port number is not included in a URL since a default port number (i.e., 80 for HTTP) is correctly assumed in the URL. Thus, the port number is only included in the URL in the somewhat unusual event that the port number is different than the default port number.
The xe2x80x9c/subdirectory/sub/xe2x80x9d portion of the URL indicates the subdirectory structure of the domain name in which the desired information resides. Although having a subdirectory structure is not mandatory in a URL, the subdirectory structure of the URL allows resources categorized under the domain name to be more finely organized just as directory structures are used to organize files in a file system. The subdirectory structure xe2x80x9csubdirectory/subxe2x80x9d has multiple subdirectory levels. However, a URL might also include only one subdirectory level as in the following example URL:
xe2x80x9chttp://www.domain.com:123/subdirectory/filexe2x80x9d
Sometimes, the subdirectory structure of the URL is related to the subdirectory structure of the file system in which the corresponding resource physically resides. For example, the URL directory xe2x80x9chttp://www.domain.com/subdirectory/xe2x80x9d may correspond to the file system path xe2x80x9cc: subdirectory xe2x80x9d while the URL directory xe2x80x9chttp://www.domain.com/subdirectory1/xe2x80x9d may correspond to the file system path xe2x80x9cc: subdirectory1 xe2x80x9d. However, often the subdirectory structure of the URL does not match the file system directory structure at all. For example, the URL directory xe2x80x9chttp://www.domain.com/subdirectory/xe2x80x9d may correspond to resources located in the file system path xe2x80x9cc: main hypo thetical example xe2x80x9d while a very similar URL directory xe2x80x9chttp:/www.domain.com/subdirectory1/xe2x80x9d may correspond to resources located in the file system path xe2x80x9cd: very different file system path xe2x80x9d. In the latter case, the subdirectory structures of the URL are known as xe2x80x9cvirtual directoriesxe2x80x9d since they do not represent any physical directory structure in the file system path, but are only seen as being directories from the end-user""s viewpoint.
The xe2x80x9cfilexe2x80x9d portion of the URL identifies the name of the file that holds the actual information requested by the user. This file may typically include the extension such as xe2x80x9c.htmlxe2x80x9d which indicates that the file is written in HyperText Mark-up Language. However, numerous other file types and extensions are also transferred over the Internet.
After typing in the appropriate URL corresponding to a desired resource, the user causes a request that includes the URL to be transmitted over the Internet. For example, the user might press the xe2x80x9centerxe2x80x9d key after typing the URL thereby causing the Internet browser to generate and transmit the request. The URL contained within the request is used to route the request to a destination server that can access the desired resource. The URL is also used to inform the destination server of the file system path of the desired resource according to a predetermined routine such as a mapping technique. The destination server typically retrieves the file and transmits the file back to the end-user in the response to the request.
As described above, in generating a response to an HTTP request, the URL is converted into a file system path. However, there are no prior art methods for converting the file system path into a URL.
The present invention relates to the converting of a file system path to a Uniform Resource Locator. This conversion may occur in response to a command called xe2x80x9cPROPFINDxe2x80x9d that is included in an extension of HyperText Transport Protocol called HTTP-DAV. For example, a xe2x80x9cPROPFINDxe2x80x9d command related to xe2x80x9chttp://www.domain.com:123/subdirectory/xe2x80x9d might return, among other things, all of the URLs categorized under xe2x80x9chttp://www.domain.com:123/subdirectory/xe2x80x9d such as, for example, the following:
http://www.domain.com:123/subdirectory/file1
http://www.domain.com:123/subdirectory/file2
http://www.domain.com:123/subdirectory/subsubdirectory1/file3
http://www.domain.com:123/subdirectory/subsubdirectory1/file4
http://www.domain.com:123/subdirectory/subsubdirectory2/file5
http://www.domain.com:123/subdirectory/subsubdirectory2/file6
Each file system path does not necessarily correspond to a URL according to any predictable rule. For example, the files corresponding to URLs xe2x80x9chttp://www.domain.com:123/subdirectory/subsubdirectory2/file5xe2x80x9d and xe2x80x9chttp://www.domain.com:123/subdirectory/subsubdirectory2/file6xe2x80x9d may reside on entirely different server systems even though they have a similar URL structure. Thus, in order to determine whether the files are contained within the URL subdirectory xe2x80x9chttp://www.domain.com:123/subdirectory/xe2x80x9d, the server system might actually convert the file system path for each candidate file system path into its corresponding URL.
After receiving a file system path, an apparatus such as a conversion module converts the file system path into a URL. The following information is first obtained related to the resource located in the inputted file system path: the protocol prefix, domain name, the port number if different than default, and the URL subdirectory structure. This information may be obtained, for example, by reference to a persistent database accessible by the conversion module. Also, the information may be obtained using a URL that is provided to the conversion module for conversion into a file system path.
Once this preliminary information is obtained, the building of the URL commences. For illustration purposes, the file system path xe2x80x9cc: directory sub filexe2x80x9d is converted into an example URL xe2x80x9chttp://www.domain.com:123/subdirectory/sub/filexe2x80x9d. The building of the uniform resource locator begins by assigning, in this example, the protocol prefix xe2x80x9chttp://xe2x80x9d as the left-most characters of the URL. The prefix protocol is selected to match the prefix protocol of the requested URL that is associated with the xe2x80x9cPROPFINDxe2x80x9d command. The protocol prefix used in constructing the URL can instead be xe2x80x9chttps://xe2x80x9d, xe2x80x9cftp://xe2x80x9d, and so forth, depending on the protocol prefix of the requested URL associated with the xe2x80x9cPROPFINDxe2x80x9d command.
Next, the domain name xe2x80x9cwww.domain.comxe2x80x9d is appended to the protocol prefix to form xe2x80x9chttp://www.domain.comxe2x80x9d. This domain name is selected to match the domain name of the requested URL associated with the xe2x80x9cPROPFINDxe2x80x9d command. If the port number is different than the default as in the example, a colon xe2x80x9c:xe2x80x9d and the port number are appended to the right side of the partial URL to form xe2x80x9chttp://www.domain.com:123xe2x80x9d.
If the requested URL associated with the xe2x80x9cPROPFINDxe2x80x9d command has a URL subdirectory structure, such as xe2x80x9c/subdirectoryxe2x80x9d of this example, that subdirectory structure is appended to the right side of the partial URL to form xe2x80x9chttp://www.domain.com:123/subdirectoryxe2x80x9d. Next a latter portion xe2x80x9c sub filexe2x80x9d of the file system path is appended to the right side of the partial URL to form xe2x80x9chttp://www.domain.com:123/subdirectory sub filexe2x80x9d. Finally, any back slashes xe2x80x9c xe2x80x9d are changed to forward slashes xe2x80x9c/xe2x80x9d to form xe2x80x9chttp://www.domain.com:123/subdirectory/sub/file.
This method results in the file system path corresponding to a resource to be converted into a URL corresponding to the resource. After obtaining all the URLs categorized within the designated parent URL, the list of URLs may be returned to the end-user.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instruments and combinations particularly pointed out in the appended claims. These and other objects and features of the present invention will become more fully apparent from the following description and appended claims, or may be learned by the practice of the invention as set forth hereinafter.